public class Main {
    public static int avg (int[] arr){
        int sum = 0;
        for (int i = 0; i < arr.length; i++) {
            sum += arr[i];
        }
        int s = sum / arr.length;
        return s;
    }
    public static void main(String[] args) {

        int[] array = {1,2,3,4,5,};
        int a = avg(array);
        System.out.println(a);
    }
}